package concurrencyPractice.chapter03;

import jdk.jfr.Event;

import java.util.EventListener;

/**
 * @author xinya
 * @version 1.0
 * @project javacore
 * @description 程序3-7 隐式的使 this 引用溢出
 * @date 2023/12/27 10:14:16
 */
public class ThisEscape {

    public ThisEscape (SafeListener.EventSource source) {
        source.registerListener(new EventListener() {
            public void onEvent (Event e) {
                // doSomething(e)
            }
        });
    }
}
